# -*- coding: utf-8 -*-

import sys

class WSCounter:
	counter = 0
	
	def __init__(self, point, newStr):
		self.point = point
		self.newStr = newStr
	
	def up(self):
		self.counter += 1
		
		if self.counter%self.point == 0:
			print(".", end='')
		if self.counter%self.newStr == 0:
			print("(" + str(self.counter) + ")")
		
		sys.stdout.flush()
		
		return self